<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	request.setCharacterEncoding("utf-8");
	String cp = request.getContextPath();
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>게 시 판</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

<link rel="stylesheet" href="<%=cp%>/info/css/created.css" type="text/css"/>

<script type="text/javascript" src="<%=cp%>/board/js/util.js"></script>
<script type="text/javascript" src="<%=cp%>/data/js/jquery-1.8.2.js"></script>
<script type="text/javascript">

	$(function() {        
	 
	 if("${userId}" == null || "${userId}" == ""){
	  location.href = "<%=cp%>/member/login.action";
	  return
	 }
	});

    function sendIt() {
        f = document.myForm;

    	str = f.subject.value;
    	str = str.trim();
        if(!str) {
            alert("\n제목을 입력하세요. ");
            f.subject.focus();
            return;
        }
    	f.subject.value = str;
    	
    	f.name.value = str;

        if(f.email.value) {
	    	if(!isValidEmail(f.email.value)) {
                alert("\n정상적인 E-Mail을 입력하세요. ");
                f.email.focus();
                return;
	    	}
        }

    	str = f.content.value;
	    str = str.trim();
        if(!str) {
            alert("내용을 입력하세요. ");
            f.content.focus();
            return;
        }
    	f.content.value = str;
    	
    	if(f.mode.value == "created"){
    		f.action = "<%=cp%>/info/s_created.action";
    	}else if(f.mode.value == "updated"){
    		f.action = "<%=cp%>/info/updated.action";
    	}
    	
        f.submit();
    }

</script>

</head>

<body>
<form name="myForm" method="post" action="">
	<div id="container">
		<div id="subNavigation">
			<h2><img src="<%=cp%>/info/image/center.gif" alt="고객센터" /></h2>
			<ul class="leftMenu">
                <li><a href='<%=cp%>/info/list.action'><img src='<%=cp%>/info/image/sub1.gif' alt='공지사항' /></a></li>
                <li><a href='<%=cp%>/info/qna.action'><img src='<%=cp%>/info/image/sub2.gif' class='imgover'  alt='자주 묻는 질문' /></a></li>
                <li><a href='<%=cp%>/info/s_created.action'><img src='<%=cp%>/info/image/sub5.gif'  alt='제안 / 불편사항' /></a></li>    
                <li><a href='<%=cp%>/info/sub3.action'><img src='<%=cp%>/info/image/sub3.gif'  alt='국외여행 약관' /></a></li>
                <li><a href='<%=cp%>/info/sub4.action'><img src='<%=cp%>/info/image/sub4.gif' class='imgover'  alt='국내여행 약관' /></a></li>
  				<li><a href='<%=cp%>/info/sub7.action'><img src='<%=cp%>/info/image/sub7.gif' class='imgover'  alt='여행상품권 안내' /></a></li>
 			</ul>
		</div>

		<div id="contents">
			<div class="titleArea">
				<h3><img src="<%=cp%>/info/image/suggest.gif" alt="공지사항" /><span class="visualImg"><img src="<%=cp%>/info/image/image4.gif"  alt="비주얼이미지" /></span></h3>
			</div>
			
			<div class="questionView">
				<img src="<%=cp%>/info/image/text.gif" alt="여행중의 불편하셨던 사항이나, 개선되어야 할 내용을 올려주세요-확인 후 고객님께 개별적으로 연락 드리겠습니다. " />
			</div>
			<br/>
			<table cellpadding="0" cellspacing="0" class="tbViewType1" summary="여행후기" width="100%">
				<caption></caption>
				<colgroup>
					<col width="15%" />
					<col width="*" />
					<col width="15%" />
					<col width="15%" />
				</colgroup>
				<tbody>
                    <tr>
						<th><img src="<%=cp%>/info/image/subject2.bmp" alt="제목" /></th>
						<td colspan="3">
							<input class="type_text2" type="text" size="80" name="subject" value="${dto.subject}"/>							
						</td>
					</tr>
					<tr>
						<th><img src="<%=cp%>/info/image/email.gif" alt="이메일" /></th>
						<td>
							<input class="type_text2" type="text" id="email" name="email" size="40" value="${dto.email}"/>                        
						</td>
					</tr>
					<tr>
						<td colspan="4" class="pad3">
							<div class=" inquiryBoard">
								<textarea name="content" rows="1" cols="1" class="textEntry">${dto.content}</textarea>
							</div>
						</td> 
					</tr>
				</tbody>
			</table>
			
			<!-- 버튼 -->
			<div class="btnType1">
				<input type="hidden" name="pageNum" value="${pageNum}"/>
				<input type="hidden" name="searchKey" value="${searchKey}"/>
				<input type="hidden" name="searchValue" value="${searchValue}"/>
				<input type="hidden" name="userId" value="${userId}"/>
				<input type="hidden" name="num" value="${num}"/>
				<input type="hidden" name="mode" value="${mode}"/>
					<span><a href="javascript:sendIt()"><img src="<%=cp%>/info/image/regist.gif" alt="등록하기"/></a></span>
			</div>
			<!-- 버튼 //-->
		</div>
		<!-- Contents //-->

	</div>
	<!-- Container //-->
</form>
</body>

</html>